package com.gbei.center.oauth.service;


import com.gbei.center.oauth.req.AgreeReq;
import com.gbei.center.oauth.req.LoginReq;
import com.gbei.center.oauth.req.RefreshTokenReq;
import com.gbei.center.oauth.req.TokenReq;
import com.gbei.center.utils.message.Result;

import javax.servlet.http.HttpServletRequest;

/**
 * 授权相关Service
 *
 */
public interface AuthorizationService {

    /**
     * 授权登录校验
     * @param req
     * @return
     */
     Result<?> checkLogin(LoginReq req,HttpServletRequest request);

    /**
     * 用户同意授权
     * @param req
     * @return
     */
     Result<?> agree(AgreeReq req);

    /**
     * 生成token
     * @param req
     * @return
     */
     Result<?> token(TokenReq req);

    /**
     * 刷新token
     * @param req
     * @return
     */
     Result<?> refreshToken(RefreshTokenReq req);
}
